<?php

class HTTP404Exception extends Exception 
{
    public function __construct()
    {
        parent::__construct('404 Not found', 404);
        header('HTTP/1.0 ' . $this->getMessage(), null, 404);
    }
}

?>